﻿<!--
Project: ClipFlair (http://ClipFlair.codeplex.com)
Filename: ImageOptions.xaml
Version: 20150204
-->

<UserControl x:Class="ClipFlair.Windows.Options.ImageOptions"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:btn="clr-namespace:ImageButtons;assembly=ImageButtons"
  mc:Ignorable="d"
  d:DesignHeight="295" d:DesignWidth="424"
  >

  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ClipFlair.Windows.Base;component/Themes/Generic.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </UserControl.Resources>
  
  <StackPanel Orientation="Vertical">

    <StackPanel.Resources>
      <Style TargetType="StackPanel" BasedOn="{StaticResource PropertyStackPanelStyle}" />
      <Style TargetType="Label" BasedOn="{StaticResource PropertyLabelStyle}" />
    </StackPanel.Resources>
    
    <StackPanel Orientation="Vertical">
      <Label Content="Image Source:" Target="{Binding ElementName=btnLoadImage}" />

      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>

        <Label Content="URL:" Target="{Binding ElementName=edImageURL}" Margin="5,0" Grid.Column="0" />
        <TextBox Name="edImageURL"
                 Text="{Binding Source, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
                 HorizontalScrollBarVisibility="Hidden"
                 AcceptsReturn="False"
                 Grid.Column="1"
                 Margin="0,0,5,0" />

        <btn:ImageButton Name="btnLoadImage"
                         Image="/ClipFlair.Windows.Image;component/Images/Load.png"
                         ImageHover="/ClipFlair.Windows.Image;component/Images/Load_hover.png"
                         Click="btnLoadImage_Click"
                         ToolTipService.ToolTip="Open local image file"
                         Grid.Column="2" />

      </Grid>

    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="cbCameraSourceUsed" IsChecked="{Binding CameraSourceUsed, Mode=TwoWay}" />
      <Label Content="Use Camera for Source" Target="{Binding ElementName=cbCameraSourceUsed}"/>
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="cbContentZoomToFit" IsChecked="{Binding ContentZoomToFit, Mode=TwoWay}" />
      <Label Content="Content Zoom to Fit" Target="{Binding ElementName=cbContentZoomToFit}"/>
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <CheckBox Name="edRTL" IsChecked="{Binding RTL, Mode=TwoWay}" />
      <Label Content="Right to Left (RTL) Direction" Target="{Binding ElementName=edRTL}"/>
    </StackPanel>    
    
    <StackPanel Orientation="Vertical">
      <Label Content="Action URL:" Target="{Binding ElementName=edActionURL}"/>
      <TextBox Name="edActionURL" Text="{Binding ActionURL, Mode=TwoWay}" HorizontalAlignment="Stretch" />
    </StackPanel>

    <StackPanel Orientation="Vertical">
      <Label Content="Action Time:" Target="{Binding ElementName=edActionTime}" />
      <TextBox Name="edActionTime" Text="{Binding ActionTime, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" />
    </StackPanel>

    <StackPanel Orientation="Vertical">
      <Label Content="Time:" Target="{Binding ElementName=edTime}" />
      <TextBox Name="edTime" Text="{Binding Time, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" />
    </StackPanel>

  </StackPanel>
  
</UserControl>